<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2008 XBRL International. All Rights Reserved. -->
<?xml-stylesheet type="text/xsl" href="../stylesheets/conformanceFunction.xsl"?>
<testcase
  xmlns="http://xbrl.org/2008/conformance"
  xmlns:reg="http://xbrl.org/2008/registry"
  xmlns:fcn="http://xbrl.org/2008/function"
  xmlns:cfcn="http://xbrl.org/2008/conformance/function"
  xmlns:xbrli="http://www.xbrl.org/2003/instance"
  xmlns:xhtml="http://www.w3.org/1999/xhtml"
  xmlns:xfi="http://www.xbrl.org/2008/function/instance"
  xmlns:xfie="http://www.xbrl.org/2008/function/instance/error"
  xmlns:xqt-err="http://www.w3.org/2005/xqt-errors"
  xmlns:t="http://xbrl.org/formula/conformance/example" 
  xmlns:eg="http://xbrl.org/xdt/dimension-equality-test" 
  xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xsi:schemaLocation="
  http://xbrl.org/2008/registry ../schemas/registry.xsd
  http://xbrl.org/2008/function ../schemas/function.xsd
  http://xbrl.org/2008/conformance ../schemas/conformance.xsd
  http://xbrl.org/2008/conformance/function ../schemas/conformanceFunction.xsd
  ">
  <owners>
    <reg:owner id="herm">
      <reg:name>Herm Fischer</reg:name>
      <reg:affiliation>UBMatrix / Mark V Systems</reg:affiliation>
      <reg:email>fischer@markv.com</reg:email>
     <reg:assumedOwnership moment="2008-02-05T22:30:00" />
    </reg:owner>
    <reg:owner id="geoff">
      <reg:name>Geoff Shuetrim</reg:name>
      <reg:affiliation>Galexy</reg:affiliation>
      <reg:email>geoff@galexy.net</reg:email>
     <reg:assumedOwnership moment="2008-09-11T10:10:00" />
    </reg:owner>
  </owners>

  <number>90403</number>

  <name>xfi:fact-dimension-s-equal2</name>

  <documentation>
    <xhtml:p>
      Definition treeview of this testcase:
    </xhtml:p>
    
    <xhtml:img src="fact-dimension-s-equal2.png" border="1"/>

    <xhtml:ul>
      <xhtml:li>
      P1, P2, and P3 are primary items all inheriting the hc1 <i>all</i> hypercube      
      </xhtml:li>
      <xhtml:li>
      hc1 is an <xhtml:i>all</xhtml:i> and has two dimensions:
      </xhtml:li>
      <xhtml:li>
      explDim1 is an explicit dimension with a domain member domain1, which has
      children member1 and member2
      </xhtml:li>
      <xhtml:li>
      typeDim1 is a typed dimension with a complex typed element dimVal which has:
      </xhtml:li>
      <xhtml:li>
      attributes a1 (string), a2 (decimal), and a3 (double)
      </xhtml:li>
      <xhtml:li>
      any contents such as strVal (string), decVal (decimal), and dblVal (double), each of which also have the previously-noted three attributes
      </xhtml:li>
      <xhtml:li>
      (additional hypercube alternatives are provided in separate extended link roles to allow valid missing dimensions for these tests)
      </xhtml:li>
    </xhtml:ul>      
  </documentation>

  <reference
    xlink:type="simple"
    xlink:href="90403 xfi.fact-dimension-s-equal2 function.xml">
    function definition
  </reference>

  <variation id="V-01">
    <name>Explicit dimensions are equal, they have same member</name>
    <documentation>
      <xhtml:p>
      </xhtml:p>
     </documentation>
      
    <inputs>
      <schema xlink:type="simple" xlink:href="fact-dimension-s-equal2.xsd"/>
      <linkbase xlink:type="simple" xlink:href="fact-dimension-s-equal2-definition.xml"/>
      <instance readMeFirst="true" id="V01" xlink:type="simple" xlink:href="fact-dimension-s-equal2-instance1.xml"/>
      <cfcn:call file="V01">
        xfi:fact-dimension-s-equal2(
          //t:P1[@id='V01-left-seg'],
          //t:P1[@id='V01-right-seg'],
          QName('http://xbrl.org/formula/conformance/example','t:explDim1') 
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq true()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-01a">
    <name>Same as V-01 but scenario</name>
    <documentation>
      <xhtml:p>
      </xhtml:p>
     </documentation>
      
    <inputs>
      <schema xlink:type="simple" xlink:href="fact-dimension-s-equal2.xsd"/>
      <linkbase xlink:type="simple" xlink:href="fact-dimension-s-equal2-definition.xml"/>
      <instance readMeFirst="true" id="V01a" xlink:type="simple" xlink:href="fact-dimension-s-equal2-instance1.xml"/>
      <cfcn:call file="V01a">
        xfi:fact-dimension-s-equal2(
          //t:P1[@id='V01-left-scen'],
          //t:P1[@id='V01-right-scen'],
          QName('http://xbrl.org/formula/conformance/example','t:explDim1') 
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq true()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-01b">
    <name>Same as V-01 but one segment and one scenario dimension</name>
    <documentation>
      <xhtml:p>
      </xhtml:p>
     </documentation>
      
    <inputs>
      <schema xlink:type="simple" xlink:href="fact-dimension-s-equal2.xsd"/>
      <linkbase xlink:type="simple" xlink:href="fact-dimension-s-equal2-definition.xml"/>
      <instance readMeFirst="true" id="V01b" xlink:type="simple" xlink:href="fact-dimension-s-equal2-instance1.xml"/>
      <cfcn:call file="V01b">
        xfi:fact-dimension-s-equal2(
          //t:P1[@id='V01-left-seg'],
          //t:P1[@id='V01-right-scen'],
          QName('http://xbrl.org/formula/conformance/example','t:explDim1') 
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq true()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-02">
    <name>Typed dimensions are equal, they have same composition and values. </name>
    <documentation>
      <xhtml:p>
      Note that id attributes differ between left and right arguments, and other attributes are in different sequences.  Decimal and double attributes and text values must be compared using respective typed comparison operators.
      </xhtml:p>
     </documentation>
      
    <inputs>
      <schema xlink:type="simple" xlink:href="fact-dimension-s-equal2.xsd"/>
      <linkbase xlink:type="simple" xlink:href="fact-dimension-s-equal2-definition.xml"/>
      <instance readMeFirst="true" id="V02" xlink:type="simple" xlink:href="fact-dimension-s-equal2-instance1.xml"/>
      <cfcn:call file="V02">
        xfi:fact-dimension-s-equal2(
          //t:P1[@id='V01-left-seg'],
          //t:P1[@id='V01-right-seg'],
          QName('http://xbrl.org/formula/conformance/example','t:typeDim1')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq true()
      </cfcn:test>
    </outputs>
  </variation>

  <variation  id="V-02a">
    <name>Same as V-02 but scenario</name>
    <documentation>
      <xhtml:p>
      </xhtml:p>
     </documentation>
      
    <inputs>
      <schema xlink:type="simple" xlink:href="fact-dimension-s-equal2.xsd"/>
      <linkbase xlink:type="simple" xlink:href="fact-dimension-s-equal2-definition.xml"/>
      <instance readMeFirst="true" id="V02a" xlink:type="simple" xlink:href="fact-dimension-s-equal2-instance1.xml"/>
      <cfcn:call file="V02a">
        xfi:fact-dimension-s-equal2(
          //t:P1[@id='V01-left-scen'],
          //t:P1[@id='V01-right-scen'],
          QName('http://xbrl.org/formula/conformance/example','t:typeDim1')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq true()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-02b">
    <name>Same as V-02 but one each segment and scenario of same dimension. </name>
    <documentation>
      <xhtml:p>
      </xhtml:p>
     </documentation>
      
    <inputs>
      <schema xlink:type="simple" xlink:href="fact-dimension-s-equal2.xsd"/>
      <linkbase xlink:type="simple" xlink:href="fact-dimension-s-equal2-definition.xml"/>
      <instance readMeFirst="true" id="V02b" xlink:type="simple" xlink:href="fact-dimension-s-equal2-instance1.xml"/>
      <cfcn:call file="V02b">
        xfi:fact-dimension-s-equal2(
          //t:P1[@id='V01-left-scen'],
          //t:P1[@id='V01-right-seg'],
          QName('http://xbrl.org/formula/conformance/example','t:typeDim1')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq true()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-03">
    <name>Typed dimensions are equal, but out of left&apos; order</name>
    <documentation>
      <xhtml:p>
      Reuse of variation V-02, but right has typed sub-elements in different order, so result is false.
      </xhtml:p>
     </documentation>
      
    <inputs>
      <schema xlink:type="simple" xlink:href="fact-dimension-s-equal2.xsd"/>
      <linkbase xlink:type="simple" xlink:href="fact-dimension-s-equal2-definition.xml"/>
      <instance readMeFirst="true" id="V03" xlink:type="simple" xlink:href="fact-dimension-s-equal2-instance1.xml"/>
      <cfcn:call file="V03">
        xfi:fact-dimension-s-equal2(
          //t:P1[@id='V01-left-seg'],
          //t:P1[@id='V03-right-seg'],
          QName('http://xbrl.org/formula/conformance/example','t:typeDim1')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq false()
      </cfcn:test>
    </outputs>
  </variation>


  <variation id="V-04">
    <name>Explicit dimension of V-01 right is different from that of left</name>
    <documentation>
      <xhtml:p>
      </xhtml:p>
     </documentation>
      
    <inputs>
      <schema xlink:type="simple" xlink:href="fact-dimension-s-equal2.xsd"/>
      <linkbase xlink:type="simple" xlink:href="fact-dimension-s-equal2-definition.xml"/>
      <instance readMeFirst="true" id="V04" xlink:type="simple" xlink:href="fact-dimension-s-equal2-instance1.xml"/>
      <cfcn:call file="V04">
        xfi:fact-dimension-s-equal2(
          //t:P1[@id='V01-left-seg'],
          //t:P1[@id='V04-right-seg'],
          QName('http://xbrl.org/formula/conformance/example','t:explDim1')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq false()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-04a">
    <name>Same as V-04 but scenario</name>
    <documentation>
      <xhtml:p>
      </xhtml:p>
     </documentation>
      
    <inputs>
      <schema xlink:type="simple" xlink:href="fact-dimension-s-equal2.xsd"/>
      <linkbase xlink:type="simple" xlink:href="fact-dimension-s-equal2-definition.xml"/>
      <instance readMeFirst="true" id="V04a" xlink:type="simple" xlink:href="fact-dimension-s-equal2-instance1.xml"/>
      <cfcn:call file="V04a">
        xfi:fact-dimension-s-equal2(
          //t:P1[@id='V01-left-scen'],
          //t:P1[@id='V04-right-scen'],
          QName('http://xbrl.org/formula/conformance/example','t:explDim1')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq false()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-04b">
    <name>Same of V-04 but one each segment and scenario dimension</name>
    <documentation>
      <xhtml:p>
      </xhtml:p>
     </documentation>
      
    <inputs>
      <schema xlink:type="simple" xlink:href="fact-dimension-s-equal2.xsd"/>
      <linkbase xlink:type="simple" xlink:href="fact-dimension-s-equal2-definition.xml"/>
      <instance readMeFirst="true" id="V04b" xlink:type="simple" xlink:href="fact-dimension-s-equal2-instance1.xml"/>
      <cfcn:call file="V04b">
        xfi:fact-dimension-s-equal2(
          //t:P1[@id='V01-left-scen'],
          //t:P1[@id='V04-right-seg'],
          QName('http://xbrl.org/formula/conformance/example','t:explDim1')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq false()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-05">
    <name>Explicit dimension of V-01 right is missing from that of left</name>
    <documentation>
      <xhtml:p>
      </xhtml:p>
     </documentation>
      
    <inputs>
      <schema xlink:type="simple" xlink:href="fact-dimension-s-equal2.xsd"/>
      <linkbase xlink:type="simple" xlink:href="fact-dimension-s-equal2-definition.xml"/>
      <instance readMeFirst="true" id="V05" xlink:type="simple" xlink:href="fact-dimension-s-equal2-instance1.xml"/>
      <cfcn:call file="V05">
        xfi:fact-dimension-s-equal2(
          //t:P1[@id='V01-left-seg'],
          //t:P3[@id='V05-right-seg'],
          QName('http://xbrl.org/formula/conformance/example','t:explDim1')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq false()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-06">
    <name>Typed dimension of V-01 right is missing from that of left</name>
    <documentation>
      <xhtml:p>
      </xhtml:p>
     </documentation>
      
    <inputs>
      <schema xlink:type="simple" xlink:href="fact-dimension-s-equal2.xsd"/>
      <linkbase xlink:type="simple" xlink:href="fact-dimension-s-equal2-definition.xml"/>
      <instance readMeFirst="true" id="V06" xlink:type="simple" xlink:href="fact-dimension-s-equal2-instance1.xml"/>
      <cfcn:call file="V06">
        xfi:fact-dimension-s-equal2(
          //t:P1[@id='V01-left-seg'],
          //t:P3[@id='V06-right-seg'],
          QName('http://xbrl.org/formula/conformance/example','t:typeDim1')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq false()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-07">
    <name>Explicit dimension of V-05 left also missing, since both missing, result is true</name>
    <documentation>
      <xhtml:p>
      </xhtml:p>
     </documentation>
      
    <inputs>
      <schema xlink:type="simple" xlink:href="fact-dimension-s-equal2.xsd"/>
      <linkbase xlink:type="simple" xlink:href="fact-dimension-s-equal2-definition.xml"/>
      <instance readMeFirst="true" id="V07" xlink:type="simple" xlink:href="fact-dimension-s-equal2-instance1.xml"/>
      <cfcn:call file="V07">
        xfi:fact-dimension-s-equal2(
          //t:P3[@id='V07-left-seg'],
          //t:P3[@id='V05-right-seg'],
          QName('http://xbrl.org/formula/conformance/example','t:explDim1')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq true()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-08">
    <name>Typed dimension of V-06 is missing from both left and right so result is true</name>
    <documentation>
      <xhtml:p>
      </xhtml:p>
     </documentation>
      
    <inputs>
      <schema xlink:type="simple" xlink:href="fact-dimension-s-equal2.xsd"/>
      <linkbase xlink:type="simple" xlink:href="fact-dimension-s-equal2-definition.xml"/>
      <instance readMeFirst="true" id="V08" xlink:type="simple" xlink:href="fact-dimension-s-equal2-instance1.xml"/>
      <cfcn:call file="V08">
        xfi:fact-dimension-s-equal2(
          //t:P3[@id='V08-left-seg'],
          //t:P3[@id='V06-right-seg'],
          QName('http://xbrl.org/formula/conformance/example','t:typeDim1')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq true()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-09">
    <name>Typed dimension value s-equal2 test involving simple text values</name>
    <documentation>
      <xhtml:p>
        The two dimension values are d-equal. The content model for the
        dimension is an element with simple content with xs:string type.
        The string content of the dimension values do not include any
        white space.
      </xhtml:p>
     </documentation>
    <inputs>
      <schema xlink:type="simple" xlink:href="simpleTextValue.xsd"/>
      <linkbase xlink:type="simple" xlink:href="simpleTextValue-definition.xml"/>
      <instance readMeFirst="true" id="V09" xlink:type="simple" xlink:href="simpleTextValue-instance-01.xml"/>
      <cfcn:call file="V09">
        xfi:fact-dimension-s-equal2(
          //eg:concept[1],
          //eg:concept[2],
          QName('http://xbrl.org/xdt/dimension-equality-test','eg:dimension')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq true()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-10">
    <name>
      Typed dimension value s-equal2 test involving simple text values
      with different amounts of internal whitespace.
    </name>
    <documentation>
      <xhtml:p>
        The two dimension values are NOT d-equal. The content model for
        the dimension is an element with simple content with xs:string
        type. The string content of the dimension values includes
        different internal white space but no leading or trailing white
        space.
      </xhtml:p>
     </documentation>
    <inputs>
      <schema xlink:type="simple" xlink:href="simpleTextValue.xsd"/>
      <linkbase xlink:type="simple" xlink:href="simpleTextValue-definition.xml"/>
      <instance readMeFirst="true" id="V10" xlink:type="simple" xlink:href="simpleTextValue-instance-02.xml"/>
      <cfcn:call file="V10">
        xfi:fact-dimension-s-equal2(
          //eg:concept[1],
          //eg:concept[2],
          QName('http://xbrl.org/xdt/dimension-equality-test','eg:dimension')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq false()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-11">
    <name>
      Typed dimension value s-equal2 test involving simple text values
      with identical leading white space.
    </name>
    <documentation>
      <xhtml:p>
        The two dimension values are d-equal. The content model for the
        dimension is an element with simple content with xs:string type.
        The string content of the dimension values includes identical
        leading white space.
      </xhtml:p>
     </documentation>
    <inputs>
      <schema xlink:type="simple" xlink:href="simpleTextValue.xsd"/>
      <linkbase xlink:type="simple" xlink:href="simpleTextValue-definition.xml"/>
      <instance readMeFirst="true" id="V11" xlink:type="simple" xlink:href="simpleTextValue-instance-03.xml"/>
      <cfcn:call file="V11">
        xfi:fact-dimension-s-equal2(
          //eg:concept[1],
          //eg:concept[2],
          QName('http://xbrl.org/xdt/dimension-equality-test','eg:dimension')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq true()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-12">
    <name>
      Typed dimension value s-equal2 test involving simple text values
      with different leading white space.
    </name>
    <documentation>
      <xhtml:p>
        The two dimension values are NOT d-equal. The content model for
        the dimension is an element with simple content with xs:string
        type. The string content of the dimension values includes
        different leading white space.
      </xhtml:p>
     </documentation>
    <inputs>
      <schema xlink:type="simple" xlink:href="simpleTextValue.xsd"/>
      <linkbase xlink:type="simple" xlink:href="simpleTextValue-definition.xml"/>
      <instance readMeFirst="true" id="V12" xlink:type="simple" xlink:href="simpleTextValue-instance-04.xml"/>
      <cfcn:call file="V12">
        xfi:fact-dimension-s-equal2(
          //eg:concept[1],
          //eg:concept[2],
          QName('http://xbrl.org/xdt/dimension-equality-test','eg:dimension')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq false()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-13">
    <name>
      Typed dimension value s-equal2 test involving lexically identical decimal values.
    </name>
    <documentation>
      <xhtml:p>
        The two dimension values are d-equal. The content model for the
        dimension is an element with simple content with xs:decimal
        type. The lexical representation of the dimension values is
        identical.
      </xhtml:p>
     </documentation>
    <inputs>
      <schema xlink:type="simple" xlink:href="simpleDecimalValue.xsd"/>
      <linkbase xlink:type="simple" xlink:href="simpleDecimalValue-definition.xml"/>
      <instance readMeFirst="true" id="V13" xlink:type="simple" xlink:href="simpleDecimalValue-instance-05.xml"/>
      <cfcn:call file="V13">
        xfi:fact-dimension-s-equal2(
          //eg:concept[1],
          //eg:concept[2],
          QName('http://xbrl.org/xdt/dimension-equality-test','eg:dimension')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq true()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-14">
    <name>
      Typed dimension value s-equal2 test involving lexically different
      but equal value decimal values.
    </name>
    <documentation>
      <xhtml:p>
        The two dimension values are d-equal. The content model for the
        dimension is an element with simple content with xs:decimal
        type. The lexical representation of one dimension value has
        extra trailing zeros.
      </xhtml:p>
     </documentation>
    <inputs>
      <schema xlink:type="simple" xlink:href="simpleDecimalValue.xsd"/>
      <linkbase xlink:type="simple" xlink:href="simpleDecimalValue-definition.xml"/>
      <instance readMeFirst="true" id="V14" xlink:type="simple" xlink:href="simpleDecimalValue-instance-06.xml"/>
      <cfcn:call file="V14">
        xfi:fact-dimension-s-equal2(
          //eg:concept[1],
          //eg:concept[2],
          QName('http://xbrl.org/xdt/dimension-equality-test','eg:dimension')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq true()
      </cfcn:test>
    </outputs>
  </variation>


  <variation id="V-15">
    <name>
      Typed dimension value s-equal2 test involving lexically identical
      Boolean values.
    </name>
    <documentation>
      <xhtml:p>
        The two dimension values are d-equal. The content model for the
        dimension is an element with simple content with xs:boolean
        type. The lexical representation of the dimension values is
        identical.
      </xhtml:p>
     </documentation>
    <inputs>
      <schema xlink:type="simple" xlink:href="simpleBooleanValue.xsd"/>
      <linkbase xlink:type="simple" xlink:href="simpleBooleanValue-definition.xml"/>
      <instance readMeFirst="true" id="V15" xlink:type="simple" xlink:href="simpleBooleanValue-instance-07.xml"/>
      <cfcn:call file="V15">
        xfi:fact-dimension-s-equal2(
          //eg:concept[1],
          //eg:concept[2],
          QName('http://xbrl.org/xdt/dimension-equality-test','eg:dimension')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq true()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-16">
    <name>
      Typed dimension value s-equal2 test involving lexically different
      but equal Boolean values.
    </name>
    <documentation>
      <xhtml:p>
        The two dimension values are d-equal. The content model for the
        dimension is an element with simple content with xs:boolean
        type. The lexical representation of one dimension value is
        'true' and the other is '1'.
      </xhtml:p>
     </documentation>
    <inputs>
      <schema xlink:type="simple" xlink:href="simpleBooleanValue.xsd"/>
      <linkbase xlink:type="simple" xlink:href="simpleBooleanValue-definition.xml"/>
      <instance readMeFirst="true" id="V16" xlink:type="simple" xlink:href="simpleBooleanValue-instance-08.xml"/>
      <cfcn:call file="V16">
        xfi:fact-dimension-s-equal2(
          //eg:concept[1],
          //eg:concept[2],
          QName('http://xbrl.org/xdt/dimension-equality-test','eg:dimension')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq true()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-17">
    <name>
      Typed dimension value s-equal2 test involving lexically identical
      but equal QName values.
    </name>
    <documentation>
      <xhtml:p>
        The two dimension values are d-equal. The content model for the
        dimension is an element with simple content with xs:QName type.
        The lexical representation of the two QName values is identical.
      </xhtml:p>
     </documentation>
    <inputs>
      <schema xlink:type="simple" xlink:href="simpleQnameValue.xsd"/>
      <linkbase xlink:type="simple" xlink:href="simpleQnameValue-definition.xml"/>
      <instance readMeFirst="true" id="V17" xlink:type="simple" xlink:href="simpleQnameValue-instance-09.xml"/>
      <cfcn:call file="V17">
        xfi:fact-dimension-s-equal2(
          //eg:concept[1],
          //eg:concept[2],
          QName('http://xbrl.org/xdt/dimension-equality-test','eg:dimension')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq true()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-18">
    <name>
      Typed dimension value s-equal2 test involving lexically different
      but equal QName values.
    </name>
    <documentation>
      <xhtml:p>
        The two dimension values are NOT d-equal. The content model for
        the dimension is an element with simple content with xs:QName
        type. The lexical representation of the two QName values differs
        with one using the default namespace prefix and the other using
        'my' as the namespace prefix. The two dimension values are not
        d-equal because the XBRL 2.1 specification definition of
        x-equality for two XML objects requires objects with the
        xs:QName data type to be treated as strings.
      </xhtml:p>
     </documentation>
    <inputs>
      <schema xlink:type="simple" xlink:href="simpleQnameValue.xsd"/>
      <linkbase xlink:type="simple" xlink:href="simpleQnameValue-definition.xml"/>
      <instance readMeFirst="true" id="V18" xlink:type="simple" xlink:href="simpleQnameValue-instance-10.xml"/>
      <cfcn:call file="V18">
        xfi:fact-dimension-s-equal2(
          //eg:concept[1],
          //eg:concept[2],
          QName('http://xbrl.org/xdt/dimension-equality-test','eg:dimension')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq false()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-19">
    <name>
      Typed dimension value s-equal2 test involving identical
      but not equal QName values.
    </name>
    <documentation>
      <xhtml:p>
        The two dimension values are d-equal. The content model for the
        dimension is an element with simple content with xs:QName type.
        The lexical representation of the two QName values is the same
        but the 'my' namespace prefix is mapped to different namespaces
        for each of the two contexts. The two dimension values are still
        d-equal because the XBRL 2.1 specification definition of
        x-equality for two XML objects requires objects with the
        xs:QName data type to be treated as strings.
      </xhtml:p>
     </documentation>
    <inputs>
      <schema xlink:type="simple" xlink:href="simpleQnameValue.xsd"/>
      <linkbase xlink:type="simple" xlink:href="simpleQnameValue-definition.xml"/>
      <instance readMeFirst="true" id="V19" xlink:type="simple" xlink:href="simpleQnameValue-instance-11.xml"/>
      <cfcn:call file="V19">
        xfi:fact-dimension-s-equal2(
          //eg:concept[1],
          //eg:concept[2],
          QName('http://xbrl.org/xdt/dimension-equality-test','eg:dimension')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq true()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-20">
    <name>
      Typed dimension value s-equal2 test involving different
      but equal float values.
    </name>
    <documentation>
      <xhtml:p>
        The two dimension values are d-equal because they are to be
        treated as numbers. The test is complicated by the referencing
        of the relevant data type from within the typed dimension type
        declaration.
      </xhtml:p>
     </documentation>
    <inputs>
      <schema xlink:type="simple" xlink:href="complexFloatValue.xsd"/>
      <linkbase xlink:type="simple" xlink:href="complexFloatValue-definition.xml"/>
      <instance readMeFirst="true" id="V20" xlink:type="simple" xlink:href="complexFloatValue-instance-12.xml"/>
      <cfcn:call file="V20">
        xfi:fact-dimension-s-equal2(
          //eg:concept[1],
          //eg:concept[2],
          QName('http://xbrl.org/xdt/dimension-equality-test','eg:dimension')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq true()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-21">
    <name>
      Typed dimension value s-equal2 test involving a comparison of NaN values.
    </name>
    <documentation>
      <xhtml:p>
        The two dimension values are NOT d-equal because a NaN does not
        equal a NaN. The test is complicated by the referencing of the
        relevant data type from within the typed dimension type
        declaration.
      </xhtml:p>
     </documentation>
    <inputs>
      <schema xlink:type="simple" xlink:href="complexFloatValue.xsd"/>
      <linkbase xlink:type="simple" xlink:href="complexFloatValue-definition.xml"/>
      <instance readMeFirst="true" id="V21" xlink:type="simple" xlink:href="complexFloatValue-instance-13.xml"/>
      <cfcn:call file="V21">
        xfi:fact-dimension-s-equal2(
          //eg:concept[1],
          //eg:concept[2],
          QName('http://xbrl.org/xdt/dimension-equality-test','eg:dimension')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq false()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-22">
    <name>
      Typed dimension value s-equal2 test involving a comparison of two xs:token values.
    </name>
    <documentation>
      <xhtml:p>
        The two dimension values are NOT d-equal because they are to be treated as text and
        are not lexically identical.  The test case is complicated because the information about
        the data type to use for the equality test is tucked away in a separate schema that
        is imported by the schema defining the data type of the typed dimension.
      </xhtml:p>
     </documentation>
    <inputs>
      <schema xlink:type="simple" xlink:href="complexTextValue.xsd"/>
      <linkbase xlink:type="simple" xlink:href="complexTextValue-definition.xml"/>
      <instance readMeFirst="true" id="V22" xlink:type="simple" xlink:href="complexTextValue-instance-14.xml"/>
      <cfcn:call file="V22">
        xfi:fact-dimension-s-equal2(
          //eg:concept[1],
          //eg:concept[2],
          QName('http://xbrl.org/xdt/dimension-equality-test','eg:dimension')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq false()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-23">
    <name>
      Typed dimension value s-equal2 test involving a comparison of two xs:integer values.
    </name>
    <documentation>
      <xhtml:p>
        The two dimension values are s-equal because they are NOT to be treated as text and
        the lexical differences do not constitute a semantic difference.
      </xhtml:p>
     </documentation>
    <inputs>
      <schema xlink:type="simple" xlink:href="simpleIntegerValue.xsd"/>
      <linkbase xlink:type="simple" xlink:href="simpleIntegerValue-definition.xml"/>
      <instance readMeFirst="true" id="V23" xlink:type="simple" xlink:href="simpleIntegerValue-instance-15.xml"/>
      <cfcn:call file="V23">
        xfi:fact-dimension-s-equal2(
          //eg:concept[1],
          //eg:concept[2],
          QName('http://xbrl.org/xdt/dimension-equality-test','eg:dimension')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq true()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-24">
    <name>
      Typed dimension value s-equal2 test involving a comparison of two xs:integer values.
    </name>
    <documentation>
      <xhtml:p>
        The two dimension values are s-equal because they are NOT to be treated as text and
        the lexical differences do not imply semantic differences.
      </xhtml:p>
     </documentation>
    <inputs>
      <schema xlink:type="simple" xlink:href="simpleIntegerValue.xsd"/>
      <linkbase xlink:type="simple" xlink:href="simpleIntegerValue-definition.xml"/>
      <instance readMeFirst="true" id="V24" xlink:type="simple" xlink:href="simpleIntegerValue-instance-16.xml"/>
      <cfcn:call file="V24">
        xfi:fact-dimension-s-equal2(
          //eg:concept[1],
          //eg:concept[2],
          QName('http://xbrl.org/xdt/dimension-equality-test','eg:dimension')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq true()
      </cfcn:test>
    </outputs>
  </variation>

  <variation id="V-25">
    <name>
      Typed dimension value s-equal2 test involving a comparison of two xs:time values.
    </name>
    <documentation>
      <xhtml:p>
        The two dimension values are NOT s-equal because they are to be treated as text and
        are not lexically identical because of time zone differences.
      </xhtml:p>
     </documentation>
    <inputs>
      <schema xlink:type="simple" xlink:href="simpleTimeValue.xsd"/>
      <linkbase xlink:type="simple" xlink:href="simpleTimeValue-definition.xml"/>
      <instance readMeFirst="true" id="V25" xlink:type="simple" xlink:href="simpleTimeValue-instance-17.xml"/>
      <cfcn:call file="V25">
        xfi:fact-dimension-s-equal2(
          //eg:concept[1],
          //eg:concept[2],
          QName('http://xbrl.org/xdt/dimension-equality-test','eg:dimension')
          )
      </cfcn:call>
    </inputs>
    <outputs>
      <cfcn:test>
         $result instance of xs:boolean and
         count( $result ) eq 1 and
         $result eq false()
      </cfcn:test>
    </outputs>
  </variation>


  <revisions>
    <reg:revision on="2008-02-05T22:30:00" by="herm">
      <xhtml:p>
        Created the test case.
      </xhtml:p>
    </reg:revision>
    <reg:revision on="2008-09-11T10:10:00" by="geoff">
      <xhtml:p>
        Added extra test case variations to cover different additional
        types and to get a more complete set of tests covering how the
        XML Schema data types are determined.
      </xhtml:p>
    </reg:revision>
    <reg:revision on="2008-09-25T13:00:00" by="geoff">
      <xhtml:p>
        Added extra test case variations to cover integers and times.
      </xhtml:p>
    </reg:revision>
    <reg:revision on="2008-11-14T13:00:00" by="geoff">
      <xhtml:p>
        Corrected the integer-related test-case variations to 
        reflect the fact that integers are derived from decimals in
        the XML Schema datatypes system
      </xhtml:p>
    </reg:revision>
    <reg:revision on="2010-09-11T00:00:00" by="herm">
      <xhtml:p>
        Corrected test case instances removing nested IDs in context typed dimension values per bug 378.
      </xhtml:p>
    </reg:revision>
  </revisions>
</testcase>







